#ifndef _SEI_H_
#define _SEI_H_

#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <stdio.h>
#include "iflydvr.h"
#include "vendor.h"

#define MAX_SEI_ALARM_TXT 16


#define ONE_SEI_MAX 255
#define MAX_SEI 1024
extern char alarm_showtxt[8][MAX_SEI_ALARM_TXT];

#ifdef ALARM_SWITTOCH
void set_alarm_show_txt(char *txt,int ch);
void clear_alarm_show_txt(int ch);
int get_alarm_msg(int num,char * msg);
#endif
int format_seidata(u8* dstbuf, u8* userdata, u8 len, u8 type);
int unformat_seidata(u8 *oneseidata,u8* userdata,u8* len,u8 *type);
int insert_onedata_tosei(u8 *seidata, u8 *oneseidata);
int dealseidata(u8 *buf,u32 len);
int get_seidata(u8 *seidata);

int DecodeBuf(unsigned char *dec_buf,unsigned char *data_buf,int len);

void DiverseBuf(unsigned char *dec_buf,unsigned char *first_buf,unsigned char *second_buf);


#endif

